import {get, post} from '@/request/useRequest'
import { ResponseBody } from '@/api/typing';
import { MenuRoute } from '@/api/system/core/typing';

export async function findUserMenus(): Promise<ResponseBody<MenuRoute>> {
  return get('menu/findUserMenus');
}

export async function list(): Promise<ResponseBody<MenuRoute>> {
  return get('menu/list');
}

export async function upsert(params: object): Promise<ResponseBody> {
  return post('menu/upsert', params);
}

export async function deleted(params: object): Promise<ResponseBody> {
  return post('menu/deleted', params);
}

export async function exists(params: object): Promise<ResponseBody> {
  return get('menu/exists', params);
}